package com.benio.ycfdisplayer.displayer;

import android.view.View;

/**
 * 监听器
 * Created by zhangzhibin on 2016/8/30.
 */
public interface DisplayListener {
    /**
     * Is called when image is loaded successfully (and displayed in View if one was specified)
     *
     * @param imageUri   Loaded image URI
     * @param view       View for image. Can be <b>null</b>.
     * @param loadedData Loaded data that depends on your {@link Executor}.
     */
    void onSuccess(String imageUri, View view, Object loadedData);

    /**
     * Is called when an error was occurred during image loading
     *
     * @param imageUri  Loading image URI
     * @param view      View for image. Can be <b>null</b>.
     * @param throwable Reason to explain why image loading was failed
     */
    void onFailure(String imageUri, View view, Throwable throwable);

}
